package com.mvp.shq.washer.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/9/4.
 */

public class OrderResponse {

    /**
     * couponId : string
     * patternId : string
     * payType : 0  微信 0，支付宝 1，余额，2，优惠券 3
     * totalMoney : 0
     * userId : string
     * washerId : string
     */

    private String couponId;
    private String patternId;
    private int payType;
    private BigDecimal totalMoney;
    private String userId;
    private String washerId;

    public static OrderResponse objectFromData(String str) {

        return new Gson().fromJson(str, OrderResponse.class);
    }

    public static List<OrderResponse> arrayOrderResponseFromData(String str) {

        Type listType = new TypeToken<ArrayList<OrderResponse>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getCouponId() {
        return couponId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    public String getPatternId() {
        return patternId;
    }

    public void setPatternId(String patternId) {
        this.patternId = patternId;
    }

    public int getPayType() {
        return payType;
    }

    public void setPayType(int payType) {
        this.payType = payType;
    }

    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getWasherId() {
        return washerId;
    }

    public void setWasherId(String washerId) {
        this.washerId = washerId;
    }
}
